import http from '../utils/http'


let URL = ''
let URL1 = ''
let URL2 = ''
if ('true' !== process.env.VUE_APP_USE_MOCK) {
  URL = process.env.VUE_APP_BASE_ESP
  URL1 = process.env.VUE_APP_BASE_ESP_EMPLOY
  URL2 = process.env.VUE_APP_BASE_ESP_ROSTER
}
// URL = 'https://dat-sale.95549.cn/restful/esp'
export default{
    // 登录凭证校验
    agentCheck(params) {
      return http.get(URL + '/agent/check', params)
    },
    // 6.1产品试算
    getCustomerInsureCharge(params){
      return http.post(URL + '/customer/insure/charge',params)
    },
    //  3.5获取代理人的订单明细
    getOrderDetailAgent(params){
      return http.get(URL + '/agent/order/detail',params)
    },
    // 16.1验签获取contexttoken
    getCheckSign(params){
      console.log(params)
      return http.post(URL + '/common/checkSign',params)
    },
    //  6.3获取 客户的订单明细
    getOrderDetailCustomer(params){
      return http.post(URL + '/customer/order/detail',params)
    },
    //16.5 上传图片 
    uploaderImg(params){
      return http.post(URL + '/uploader/common',params)
      // return http.post('http://10.56.39.106:8080/gh-esp-restful/restful/esp' + '/uploader/common',params)
    },
    // 4.2个人中心及个人信息数据查询
    agentInfo() {
      return http.post(URL + '/agent/info')
    },
    // 15.4计划书列表数据查询
    proposalList(params) {
      return http.post(URL + '/agent/proposal/queryList', params)
    },
    // 3.4订单列表数据查询
    orderList(params) {
      return http.get(URL + '/agent/order/list', params)
    },
    // 6.8健康告知数据查询
    showImpart(params) {
      return http.post(URL + '/customer/product/showImpart',params)
    },
    // 6.4投保人确认接口
    appntCheck(params) {
      return http.post(URL + '/customer/insure/appntCheck',params)
    },
    //  16.3获取图形验证码ID
    getGraphId(params){
      return http.get(URL + '/verify/graph',params)
    },
    //16.4 展示图形验证码 /showgraph/{graphId}
    getGraphCode(graphId){
      console.log(graphId)
      return `${URL + '/verify/showgraph/'+graphId}`
      // return 'https://dat-eservice.95549.cn/eservice/cattcha.action?action=image&&a=658'
    },
    // 6.15发送短信验证码
    getNoteCode(params){
      return http.post(URL + '/verify/sms',params)
    },
    // 6.7支付承保接口
    accInsurance(params){
      return http.post(URL + '/customer/insure/accInsurance',params)
    },
    // 6.6转人工核保/线下支付接口
    artificial(params){
      return http.post(URL + '/customer/insure/artificial',params)
    },
    //15.5 获取客户的计划书详情
    getProposalDetailC(params){
      console.log(URL + '/customer/proposal/queryDetail')
      return http.post(URL + '/customer/proposal/queryDetail',params)
    },
    // 15.1利益试算接口
    benecharge(params){
      return http.post(URL + '/proposal/benecharge',params)
    },
    //15.6 获取代理人计划书详情
    getProposalDetailA(params){
      return http.post(URL + '/agent/proposal/queryDetail',params)
    },
    //3.3订单保存接口
      saveOrder(params){
          return http.post(URL + '/agent/insure/saveOrder',params)
      },
    // 登录
    login(params){
      return http.get(URL + '/account/login',params)
    },
    // 15.2生成（baocun）计划书
    savePropsal(params){  
      return http.post(URL + '/agent/proposal/save',params)
    },
    // 核保失败时->再次核保
    underWrite(params){
      return http.post(URL + '/customer/insure/underWrite',params)
    },
    // 17.1 客户列表查询接口
    qryContactInfoList(params){
      return http.post(URL + '/agent/contact/qryContactInfoList',params)
    },
    // 17.2 客户详情 
    contactDetail(params){
      return http.post(URL + '/agent/contact/contactDetail',params)
    },
    // 18.1保单列表查询接口
    policyQueryList(params){
      return http.post(URL + '/agent/policy/queryList',params)
    },
    // 18.2 保单详细查询接口
    policyQueryDetail(params){
      return http.post(URL + '/agent/policy/queryDetail',params)
    },
    // 16.1 团队信息查询接口
    queryGroupInfo(params){
      return http.post(URL + '/agent/group/queryGroupInfo',params)
    },
    // 16.2团队人员列表查询接口 
    queryGroupAgentList(params){
      return http.post(URL + '/agent/group/queryGroupAgentList',params)
    },
    // 16.3直辖部组查询接口 
    queryAgentGroupItem(params){
      return http.post(URL + '/agent/group/queryAgentGroupItem',params)
    },
    // 16.4 团队人员详情查询接口 
    queryAgentItem(params){
      return http.post(URL + '/agent/group/queryAgentItem',params)
    },
    // 订单关闭
    orderClose(params) {
      return http.get(URL + '/agent/order/close',params)
    },
    // 更新订单状态
    changeStatus(params){
      return http.post(URL + '/customer/insure/changeStatus',params)
    },
    // 17.3
    relationInfo(params){
      return http.post(URL + '/agent/contact/relationInfo',params)
      // return http.post('http://10.56.39.106:8080/gh-esp-restful/restful/esp' + '/agent/contact/relationInfo',params)

    },
    // 19.6 影像件信息识别接口
    imgDiscern(params){
      return http.post(URL + '/common/imgDiscern',params)
    },
    // 6.17 告知书生成接口
    getNotification(params){
      return http.post(URL + '/customer/insure/getNotification',params)
    },
    // 3.7 撤单提交接口
    orderRevoke(params) {
      return http.get(URL + '/agent/order/revoke',params)
    },
    
    // 6.23 支付查询接口
    queryPayInfo(params) {
      return http.post(URL + '/customer/insure/queryPayInfo',params)
    },
    
    // 6.24 申请签约接口
    applyContract(params) {
      return http.post(URL + '/customer/insure/applyContract',params)
    },
    // 6.20 银行账户变更授权查询接口
    changeBankCardQuery(params) {
      return http.post(URL + '/customer/insure/changeBankCardQuery',params)
    },
    // 6.21
    changeBankCardSub(params) {
      return http.post(URL + '/customer/insure/changeBankCard',params)
    },
    // 6.18 投保人确认书查询接口
    getAppntConfirmationQrery(params){
      return http.post(URL + '/customer/insure/appntConfirmationQrery',params)
    },
    // 6.19 投保人确认书提交接口
    getAppntConfirmation(params){
      return http.post(URL + '/customer/insure/appntConfirmation',params)
    },
    // 6.22 投保人确认书提交接口
    getReceiptApply(params){
      return http.post(URL + '/customer/insure/signContract',params)
    },
    
    // 6.18 客户告知书签名提交接口
    getNoticeSignature(params){
      return http.post(URL + '/customer/insure/getNoticeSignature',params)
    },
    // 6.19 客户告知书查询接口
    qryNotificationInfo(params){
      return http.post(URL + '/customer/insure/qryNotificationInfo',params)
    },
    // 3.15 代理人告知书签名提交接口
    getAgentNoticeSignature(params){
      return http.post(URL + '/agent/notification/getNoticeSignature',params)
    },
    // 3.14 代理人告知书查询接口
    qryAgentNotificationInfo(params){
      return http.post(URL + '/agent/notification/qryNotificationInfo',params)
    },
    //  客户保单详细查询接口
    policyCustomerDetail(params){
      return http.post(URL + '/customer/policy/queryDetail',params)
    },

    // 订单关闭接口（对应订单列表‘关闭’按钮）
    orderCancel(params) {
      return http.get(URL + '/agent/order/cancel',params)
    },
    // 17.6 成员删除 
    deleteFamily(params){
      return http.post(URL + '/agent/family/deleteFamily',params)
      // return http.post('http://10.56.39.106:8080/gh-esp-restful/restful/esp' + '/agent/family/deleteFamily',params)
    },
    // 17.5 新增修改家庭成员 
    updateFamily(params){
      return http.post(URL + '/agent/family/updateFamily',params)
      // return http.post('http://10.56.39.106:8080/gh-esp-restful/restful/esp' + '/agent/family/updateFamily',params)

    },
    // 头像上传接口
    headPortrait(params) {
      return http.post(URL + '/account/uploadHeadPortrait',params)
    },
    // 变更头像接口
    upHeadPortrait(params) {
      return http.post(URL + '/account/updateHeadPortrait',params)
    },
    // 17.4 客户删除接口
    deleteContact(params){
      return http.post(URL + '/agent/contact/deleteContact',params)
    },
    updateContact(params){
      return http.post(URL + '/agent/contact/updateContact',params)
    },
    // 17.7.1查询代理人客户汇总信息
    countCustomer(params){
      return http.post(URL + '/agent/contact/countCustomer',params)
    },
    // 6.29 线下扣款
    accOffLinePayment(params) {
      return http.post(URL + '/customer/insure/accOffLinePayment',params)
    },
    // 17.14 导出客户列表表格
    exportContactInfoList(params){
      return http.post(URL + '/agent/contact/exportContactInfoList',params)
    },
    // 17.15 客户备忘录资料信息查询接口
    qryMemoInformation(params){
      return http.post(URL + '/agent/contact/qryMemoInformation',params)
    },
    // 17.16 客户备忘录资料信息保存接口
    saveMemoInfo(params){
      return http.post(URL + '/agent/contact/saveMemoInfo',params)
    },
    // 6.34 PDF文件生成图片列表查询接口
    getPdfImageList(params){
      return http.post(URL + '/customer/query/getPdfImageList',params)
    },
    // 6.34 双录确认接口
    appntDoubleRule(params){
      return http.post(URL + '/customer/insure/appntDoubleRule',params)
    },
    // 20.9 人脸识别
    faceDetect(params){
      return http.post(URL + '/common/faceDetect',params)
    },
    // 获取跳转链接参数接口
    recruitInvite(params){
      return http.post(URL1 + '/employ/recruit/invite',params)
    },
    // 获取token接口
    getRecruitToken(params){
      return http.post(URL1 + '/employ/employee/getRecruitToken',params)
    },
    // 保存雇员信息接口
    saveEmployee(params){
      return http.post(URL1 + '/employ/employee/saveEmployee',params)
    },
    // 获取雇员信息接口
    getEmployee(params){
      return http.get(URL1 + '/employ/employee/getEmployee',params)
    },
    // 获取下拉选接口
    getEnum(params){
      return http.get(URL1 + '/employ/employee/getEnum',params)
    },
    // 获取oss上传地址接口
    getOSSUploadURL(params){
      return http.get(URL1 + '/employ/getOSSUploadURL',params)
    },
    // 保存附件接口
    saveFile(params){
      return http.post(URL1 + '/employ/employee/saveFile',params)
    },
    // 附件查询接口
    getFileList(params){
      return http.get(URL1 + '/employ/employee/getFileList',params)
    },
    // 上传图片接口
    uploadFile(params){
      return http.post(URL1 + '/employ/recruit/uploadFile',params)
    },
    // 电子签名接口
    employeeSign(params){
      return http.post(URL1 + '/employ/employee/sign',params)
    },
    // 获取管理机构接口
    queryBelongCom(params){
      return http.post(URL1 + '/employ/recruit/queryBelongCom',params)
    },
    // 获取推荐人接口
    getAgentUserList(params){
      return http.post(URL1 + '/employ/recruit/getAgentUserList',params)
    },
    // 获取附件oss下载地址接口
    getOSSDownloadURL(params){
      return http.get(URL1 + '/employ/getOSSDownloadURL',params)
    },
    //获取面试人列表（代理人）
    interviewersList(params){
      return http.post(URL1 + '/employ/recruit/getRecruitPage',params)
    },
    // 获取跳转推送链接（无登陆）
    inviteNoLogin(params){
      return http.post(URL1 + '/employ/recruit/inviteNoLogin',params)
    },
    // 获取增员统计数据接口
    getRecruitOverview(params){
      return http.post(URL1 + '/employ/recruit/getRecruitOverview',params)
    },
    getShareUrl(params) {
      return http.post(URL + '/customer/insure/shareUrl', params)
    },
    // 生日客户列表接口
    birthdayQueryCustomerList(params){
      return http.post(URL + '/agent/birthday/queryCustomerList',params)
    },
    // 生日客户家庭成员列表接口
    queryCustomerFamilyList(params){
      return http.post(URL + '/agent/birthday/queryCustomerFamilyList',params)
    },
    // 代理人30天生日客户数量查询接口
    queryCustomerCount(params){
      return http.post(URL + '/agent/birthday/queryCustomerCount',params)
    },
    // 分享贺卡接口
    birthdayShareCard(params){
      return http.post(URL + '/agent/birthday/shareCard',params)
    },
    // 查询银行卡限额
    getBankLimit(params){
      return http.post(URL + '/agent/insure/queryPayInfo',params)
    },
    // 智能核保接口
    doIntellUnderWrite(params){
      return http.post(URL + '/customer/insure/doIntellUnderWrite',params)
    },
    // 支付接口查询接口
    accResult(params) {
      return http.post(URL + '/customer/insure/accResult', params)
    },
    // 3.26.代理人双录信息提交接口
    doubleSubmit(params) {
      return http.post(URL + '/agent/double/submit', params)
    },
    // 核实关联保单投保人
    queryAssociatState(params) {
      return http.post(URL + '/agent/insure/queryAssociatState', params)
    },
     // 代理人登录
    passwordLogin(params){
      return http.get(URL+'/account/passwordLogin',params)
    },
    // 6.44 风险测评暂存接口
    saveRiskAssess(params){
      return http.post(URL + '/customer/insure/saveRiskAssess',params)
    },
    // esp2/3.1资源获客名单列表查询接口
    getRosterList(params){
      return http.post(URL2 + '/roster/roster/list',params)
      // return http.post('http://10.56.112.63:7001/restful/esp/customer/roster/list',params)
    },
    // esp2/3.5名单详情查询接口
    getRosterDetail(params){
      return http.post(URL2 + '/roster/roster/detail',params)
      // return http.post('http://10.56.112.63:7001/restful/esp/customer/roster/detail',params)
    },
    // esp2/3.6录音播放接口
    getRecordUrl(params){
      return http.post(URL2 + '/roster/recordUrl',params)
      // return http.post('http://10.56.112.63:7001/restful/esp/customer/recordUrl',params)
    },
    // esp2/3.7拨打电话接口
    getCustomerCall(params){
      return http.post(URL2 + '/roster/call',params)
      // return http.post('http://10.56.112.63:7001/restful/esp/customer/call',params)
    },
    // esp2/3.8拨打记录查询接口
    getCallRecord(params){
      return http.post(URL2 + '/roster/roster/callRecord',params)
    },
    // esp2/3.9通话登记接口
    submitQuestion(params){
      return http.post(URL2 + '/roster/roster/submitQuestion',params)
    },
    // 关联保单接口
    queryListForInsure(params){
      return http.post(URL + '/agent/relation/policy/queryList',params)
    //   return http.post('http://10.56.40.146:7087/esp-restful/restful/esp/agent/relation/policy/queryList',params)
    },
    // 问题件详情接口
    queryProblemShipmentInfo(params){
      return http.post(URL + '/customer/insure/queryProblemShipmentInfo',params)
    },
    // 问题件提交接口
    problemShipmentSubmit(params){
      return http.post(URL + '/customer/insure/problemShipmentSubmit',params)
    },
    // 新登录方法（RSA加密）
    passwordLoginHasCheck(params){
      return http.get(URL + '/account/passwordLoginHasCheck',params)
    },
    // 3.28.代理人影像件信息补充提交接口
    agentImageSubmit(params){
      return http.post(URL + '/agent/image/submit',params)
    },
    // 5.5企业微信静默登陆接口
    wechatLogin(params){
      return http.get(URL + '/wechat/login',params)
    },
    // esp2/5.1获取聊天会话列表接口
    getWechatlist(params){
      return http.post(URL2 + '/roster/wechat/wechatList',params)
    },
    // esp2/5.2查看企业微信聊天记录接口
    getViewChat(params){
      return http.post(URL2 + '/roster/wechat/viewChat',params)
    },
    // esp2/3.10名单修改接口
    setModify(params){
      return http.post(URL2 + '/roster/roster/modify',params)
    },
    // esp2/4.1保单列表查询接口
    getPolicyList(params){
      return http.post(URL2 + '/roster/policy/list',params)
    },
    // esp2/4.2添加保单接口
    setPolicyAdd(params){
      return http.post(URL2 + '/roster/policy/add',params)
    },
    // refreshToken换token
    refreshGetToken(params){
      return http.get(URL + '/app/refresh',params)
    },
    // esp2/3.2已回收名单列表查询接口
    getRecycleList(params){
      return http.post(URL2 + '/roster/recycle/list',params)
    },
    // esp2/4.3删除保单接口接口
    deletePolicy(params){
      return http.post(URL2 + '/roster/policy/delete',params)
    },
    // esp2/3.14用户360画像接口
    getAllportray(params){
      return http.post(URL2 + '/roster/user/allportray',params)
    },
    // esp2/3.10通话登记查询接口
    queryQuestion(params){
      return http.post(URL2 + '/roster/roster/queryQuestion',params)
    },
    // esp2/3.15面访登记接口
    submitInterviewInfo(params){
      return http.post(URL2 + '/roster/roster/submitInterviewInfo',params)
    },
    // esp2/3.16面访查询接口
    queryInterviewInfo(params){
      return http.post(URL2 + '/roster/roster/queryInterviewInfo',params)
    },
    // esp 6.50解约接口
    rescindCard(params){
      return http.post(URL + '/customer/insure/rescindCard',params)
    },
    //6.48双录视频状态查询接口
    getDoubleRuleStatus(params){
      return http.post(URL + '/customer/insure/getDoubleRuleStatus',params)
    },
    //6.8保存支付信息接口
    savePayInfo(params){
      return http.post(URL + '/customer/insure/savePayInfo',params)
    }
}
